using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Storage;
using Microsoft.Xna.Framework.Content;

using BriansClimb.DrawableGameObjects.ClimbingHolds;
using BriansClimb.GameObjects;
using BriansClimb.Climber;

namespace BriansClimb.GameObjects
{
    /// <summary>
    /// This is an object that represents a contact instance between a climber's hand and a hold.
    /// </summary>
    /// 

    public class ContactObject : Microsoft.Xna.Framework.GameComponent
    {
        protected ClimbingHold hold;
        protected BodyPart hand;
        //!The initial difference between the friction of the hand and the friction of the hold
        protected int initialDifference;
        //!Indicates if the contact object can be removed.
        bool removeMe = false;
        

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="hold">Hold of the contact object.</param>
        /// <param name="hand">Hand of the contact object.</param>
        /// <param name="game">Master game object</param>
        public ContactObject(ClimbingHold hold, BodyPart hand, Game game)
            : base(game)
        {
            this.hold = hold;
            this.hand = hand;
            this.initialDifference = hand.HandFriction - hold.HoldFriction;       
        }

        /// <summary>
        /// Default constructor.
        /// </summary>
        /// <param name="game">Master game object</param>
        public ContactObject(Game game)
            : base(game)
        {
        }

        /// <summary>
        /// Attribute representing the hand bodypart of the contact object.
        /// </summary>
        public BodyPart contactHand
        {
            get { return hand; }
            set { hand = value; }
        }

        /// <summary>
        /// Attribute representing the hold bodypart of the contact object.
        /// </summary>
        public ClimbingHold contactHold
        {
            get { return hold; }
            set { hold = value; }
        }

        /// <summary>
        /// Allows the game component to perform any initialization it needs to before starting
        /// to run.  This is where it can query for any required services and load content.
        /// </summary>
        public override void Initialize()
        {
            // TODO: Add your initialization code here

            base.Initialize();
        }

        /// <summary>
        /// Allows the game component to update itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        public override void Update(GameTime gameTime)
        {
            // TODO: Add your update code here

            base.Update(gameTime);
        }
    }
}